# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Dale Blount <dale@archlinux.org>

pkgname=perl-sys-hostname-long
_realname=Sys-Hostname-Long
pkgver=1.5
pkgrel=3
pkgdesc="Perl module getting a full hostname"
arch=('any')
license=('PerlArtistic')
url="http://search.cpan.org/dist/${_realname}/"
depends=('perl')
checkdepends=('inetutils')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/S/SC/SCOTT/${_realname}-${pkgver}.tar.gz)
md5sums=('a7d7a36fa6905bded4f6b7da94e37532')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
